<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>命名空间模式</title>
</head>
<body>
<script src="file1.js"></script>
<script src="file2.js"></script>
<script>
    module1.foo()
     module1.data= "sdgfh"
    module1.foo()
    module2.foo()
</script>
</body>
</html>